package org.feign.client.fallback;

import org.feign.client.UserFeignClient;
import org.feign.pojo.User;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @作者 itcast
 * @创建日期 2020/12/2 10:45
 **/
@Component
public class UserFeignClientFallback implements UserFeignClient {
    @Override
    public User findById(String id) {
        User user = new User();
        user.setName("对不起，网络出现异常，这是feign的服务降级方法");
        return user;
    }
}
